package cn.iocoder.springboot.lab03.kafkademo.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @Author：YH
 * @Description：
 * @Date:Created in 2023/9/30 0:18
 */
@Component
@Slf4j
public class CustomEventListener {
    @EventListener(CustomEvent.class)
    public void onApplicationEvent(CustomEvent customEvent) throws InterruptedException {
        log.info("[CustomEventListener]监听器接受消息：" + customEvent.getMessage());
    }
}
